#include "KI.h"

uint8_t is_obstacle_IFOM() {
	// Get sensor data
	uint16_t sensors[4];
	get_IR_sensor_data(sensors);
	
	// Check if one of the IR sensors returned a date which is high enough so we 
	// can assume that there is an obstacle in front of the robot.
	for(unsigned int i = 0; i<4; i++) {
		if(sensors[i] > IR_60_THRESHOLD_OBSTACLE) {
			return 1;
		}
	}
	
	return 0;
}

uint8_t is_marker_OTF() {
	// Get sensor data
	uint16_t sensors[5];
	get_RS_sensor_data(sensors);
	
	// Check if one of the RS sensors returned a date which is high enough so we
	// can assume that there is a marker.
	for(unsigned int i = 0; i<5; i++) {
		if(sensors[i] < RS_THREDSHOLD_MARKER) {
			return 1;
		}
	}
	
	return 0;
}